package com.hl.order.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hl.order.mapper.MemberRechargeRecordMapper;
import com.hl.order.domain.MemberRechargeRecord;
import com.hl.order.service.IMemberRechargeRecordService;

/**
 * 会员充值记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-11
 */
@Service
public class MemberRechargeRecordServiceImpl implements IMemberRechargeRecordService 
{
    @Autowired
    private MemberRechargeRecordMapper memberRechargeRecordMapper;

    /**
     * 查询会员充值记录
     * 
     * @param id 会员充值记录主键
     * @return 会员充值记录
     */
    @Override
    public MemberRechargeRecord selectMemberRechargeRecordById(Long id)
    {
        return memberRechargeRecordMapper.selectMemberRechargeRecordById(id);
    }

    /**
     * 查询会员充值记录列表
     * 
     * @param memberRechargeRecord 会员充值记录
     * @return 会员充值记录
     */
    @Override
    public List<MemberRechargeRecord> selectMemberRechargeRecordList(MemberRechargeRecord memberRechargeRecord)
    {
        return memberRechargeRecordMapper.selectMemberRechargeRecordList(memberRechargeRecord);
    }

    /**
     * 新增会员充值记录
     * 
     * @param memberRechargeRecord 会员充值记录
     * @return 结果
     */
    @Override
    public int insertMemberRechargeRecord(MemberRechargeRecord memberRechargeRecord)
    {
        memberRechargeRecord.setCreateTime(DateUtils.getNowDate());
        return memberRechargeRecordMapper.insertMemberRechargeRecord(memberRechargeRecord);
    }

    /**
     * 修改会员充值记录
     * 
     * @param memberRechargeRecord 会员充值记录
     * @return 结果
     */
    @Override
    public int updateMemberRechargeRecord(MemberRechargeRecord memberRechargeRecord)
    {
        return memberRechargeRecordMapper.updateMemberRechargeRecord(memberRechargeRecord);
    }

    /**
     * 批量删除会员充值记录
     * 
     * @param ids 需要删除的会员充值记录主键
     * @return 结果
     */
    @Override
    public int deleteMemberRechargeRecordByIds(Long[] ids)
    {
        return memberRechargeRecordMapper.deleteMemberRechargeRecordByIds(ids);
    }

    /**
     * 删除会员充值记录信息
     * 
     * @param id 会员充值记录主键
     * @return 结果
     */
    @Override
    public int deleteMemberRechargeRecordById(Long id)
    {
        return memberRechargeRecordMapper.deleteMemberRechargeRecordById(id);
    }
}
